package com.exthirteen.textgamescript.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

@Data
@ApiModel(value="配置",description=" 配置")
@Accessors(chain = true)
@TableName("license_key")
public class LicenseKey extends Model<LicenseKey> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * sdkId
     */
    @TableField("license")
    private String license;

    /**
     * 过期时间
     */
    @ApiModelProperty(value = "过期时间")
    @TableField("expiry_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate expiryDate;

    /**
     * 微信id
     */
    @TableField("wx_id")
    private String wxId;
}
